<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>	
<%@ include file="/pub/headmeta.jsp" %>
</head>
<body class="edit-bgr-color">
	<div class="right-head"><span class="right-head-font">修改体型</span></div>
	<div align="center" style="width: 98%">	
		<form id="editForm" method="post" enctype="multipart/form-data">	
			<input type="hidden" id="bodyId" name="bodyId" value="${data.bodyId}"/>		
			<table class="table_border" style="width: 600px; font-size: 12px;">
				<tr>
					<td width="35%" align="right">体型名称：</td>
					<td width="65%"><input type="text" name="name" id="name" style="width: 80%" required="required" value="${data.name}"/>&nbsp;&nbsp;<font color='red'>*</font></td>					
				</tr>
				<tr>
					<td align="right">体型描述：</td>
					<td><textarea name="note" id="note" style="width:80%" rows="5">${data.note}</textarea>&nbsp;&nbsp;<font color='red'>*</font></td>					
				</tr>				
			</table>
			<br>
			<div class="edit-line"></div>
			<input  type="button" class="button-1" value="修改" onclick="doEdit();"/>	
			<input  type="button" class="button-1" value="重置" onclick="resetEx(this.form);"/>					
			<input  type="button" class="button-1" value="返回" onclick="back();"/>
		</form>
	</div>
</body>
</html>
<script type="text/javascript">
<!--
var power;
//自动调用初始化
$(document).ready(function(){	

});


//编辑
function doEdit() {
	if ($("#name").val()== ""){
		alert('体型名称不能为空！');
		return;
	}
	if ($("#note").val() == ""){
		alert('体型描述不能为空！');
		return;
	}
	
	var form=$("#editForm");
	form.attr("action","${ctx}/body!edit.action"); 
	form.submit();		
}

//返回
function back(){
	location.href="${ctx}/body!viewList.action";
}
//-->
</script>
